package top.healthylife.gateway.platform.bank.dto.business;

import io.swagger.annotations.ApiModel;
import lombok.Getter;

/**
 * @author : GaoZeXi
 * @date 2021/8/17 10:00
 */
@Getter
@ApiModel("企业信用报告查询原因代码表")
public enum BusinessQueryReason {
    REASON01("01", "贷前（保前）审查"),
    REASON02("02", "贷中操作"),
    REASON03("03", "贷后（在保） 管理"),
    REASON04("04", "其他原因"),
    REASON05("05", "关联查询"),
    REASON17("17", "额度审批"),
    REASON18("18", "担保审查");
    String code;
    String name;

    BusinessQueryReason(String code, String name) {
    }

    public static BusinessQueryReason getInstance(String code){
        for (BusinessQueryReason value : values()) {
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }
}
